package com.wy.dao;

import com.wy.bean.BuildingBean;
import com.wy.model.sys.Buildings;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BuildingsMapper {
    int deleteByPrimaryKey(@Param("id")List<String> id);

    int insert(Buildings record);

    int insertSelective(Buildings record);

    Buildings selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Buildings record);

    int updateByPrimaryKey(Buildings record);

    /**
     * 获取房屋列表
     *
     * @param pageSize 每页显示条数
     * @param start 起始页数
     * @param residenceId 小区id
     * @param buildingName 楼栋名称
     * @return
     */
    public List<BuildingBean> buildingList(@Param("pageSize") Integer pageSize, @Param("start") Integer start,
                                           @Param("residenceId") Integer residenceId, @Param("buildingName") String buildingName,
                                           @Param("rids")List<String> rids);

    /**
     * 获取楼栋列表
     * @return
     */
    public List<Buildings> getBuildingByResidenceId(@Param("residenceId") Integer residenceId);

    /**
     * 获取楼栋列表的总量
     *
     * @param pageSize 每页显示条数
     * @param start 起始页数
     * @param residenceId 小区id
     * @param buildingName 楼栋名称
     * @return
     */
    public Integer buildingSize(@Param("pageSize") Integer pageSize, @Param("start") Integer start,
                                 @Param("residenceId") Integer residenceId, @Param("buildingName") String buildingName,
                                 @Param("rids") List<String> rids
    );

    /**
     * 获取所有的楼栋信息
     * @return
     */
    List<Buildings> getBuildingList();

    /**
     * 导入获取楼栋信息
     * @return
     */
    List<BuildingBean> buildingListImport(List<BuildingBean> list);

    int insertBatch(List<BuildingBean> list);


}